GtkEntry: don't forget to disconnect idles
authorMatthias Clasen <mclasen@redhat.com>
Wed, 1 Jun 2011 00:11:28 +0000 (20:11 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 1 Jun 2011 00:11:28 +0000 (20:11 -0400)
As pointed out by John Lindgren in bug 650114, GtkEntry forgets
to disconnect an idle source when the completion is set to NULL.

gtk/gtkentry.c

index b95fd8b901af4b099969de27851ce7468b05793f..ebae2c0cbdd2356145812c5a375901ebffe9e031 100644 (file)
@@ -9987,6 +9987,12 @@ gtk_entry_set_completion (GtkEntry           *entry,
           old->priv->completion_timeout = 0;
         }
 
+      if (old->priv->check_completion_idle)
+        {
+          g_source_destroy (old->priv->check_completion_idle);
+          old->priv->check_completion_idle = NULL;
+        }
+
       if (gtk_widget_get_mapped (old->priv->popup_window))
         _gtk_entry_completion_popdown (old);